package day7;

import java.io.IOException;
import java.net.ServerSocket;
import java.net.Socket;

//测试服务端
public class TestServer {
    public static void main(String[] args) throws IOException {
        ServerSocket server=new ServerSocket(9999);
        while(true) {
            System.out.println("开始执行一次");
            Socket client = server.accept(); //阻塞
            System.out.println(client);
        }
    }
}
//测试客户端
class TestClient{
    public static void main(String[] args) throws IOException {
        Socket client=new Socket("192.168.0.114",9999);
    }
}